package com.zyt.springboot.teach_factoryProxy.simpleFactory;

/*
 * @params: 制造手机工厂
 */
public class PhoneFactory {
    public Phone makePhone(String phoneType){
        if (phoneType.equalsIgnoreCase("HuaWei")){//对字符串的手机名字比较，和test里面一致
            return new HuaWeiPhone();
        } else if (phoneType.equalsIgnoreCase("XiaoMi")) {
            return new XiaoMiPhone();
        }
        return null;
    }
}
